home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / semaphores / src / findsemaphore.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.0 KB  |  56 lines

  1. /*
  2.     (C) 1995, 96 AROS - The Amiga Replacement OS
  3.     $Id$
  4.     $Log$
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "exec_intern.h"
  9. #include <aros/libcall.h>
  10.  
  11. /*****************************************************************************
  12.  
  13.     NAME */
  14.     #include <clib/exec_protos.h>
  15.  
  16.     __AROS_LH1(struct SignalSemaphore *, FindSemaphore,
  17.  
  18. /*  SYNOPSIS */
  19.     __AROS_LA(STRPTR, name, A1),
  20.  
  21. /*  LOCATION */
  22.     struct ExecBase *, SysBase, 99, Exec)
  23.  
  24. /*  FUNCTION
  25.     Find a semaphore with a given name in the system global semaphore list.
  26.     Note that this call doesn't arbitrate for the list - use Forbid() to
  27.     do this yourself.
  28.  
  29.     INPUTS
  30.     name - Pointer to name.
  31.  
  32.     RESULT
  33.     Address of semaphore structure found or NULL.
  34.  
  35.     NOTES
  36.  
  37.     EXAMPLE
  38.  
  39.     BUGS
  40.  
  41.     SEE ALSO
  42.  
  43.     INTERNALS
  44.  
  45.     HISTORY
  46.  
  47. ******************************************************************************/
  48. {
  49.     __AROS_FUNC_INIT
  50.  
  51.     /* Nothing spectacular - just look into the list */
  52.     return (struct SignalSemaphore *)FindName(&SysBase->SemaphoreList,name);
  53.     __AROS_FUNC_EXIT
  54. } /* FindSemaphore */
  55.  
  56.